package cn.baddonkey.superqueryjavasdk.entity.request;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.lang.Nullable;

import java.util.ArrayList;
import java.util.List;
import java.util.function.Consumer;

@Data
@AllArgsConstructor
@NoArgsConstructor
public class SqlProcessRequest {
    private String moduleCode;
    @Nullable
    private List<QueryParam> queryParams;

    public static SqlProcessRequest init(Consumer<SqlProcessRequest> f) {
        SqlProcessRequest obj = new SqlProcessRequest();
        obj.setQueryParams(new ArrayList<>());
        f.accept(obj);
        return obj;
    }
}
